home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / AmigaE / Src / Guide / graphics.e < prev    next >
Text File  |  1994-12-13  |  652b  |  26 lines

  1. MODULE 'intuition/intuition'
  2.  
  3. PROC main()
  4.   DEF wptr, i
  5.   wptr:=OpenW(20,50,200,100,IDCMP_CLOSEWINDOW,
  6.               WFLG_CLOSEGADGET OR WFLG_ACTIVATE,
  7.               'Graphics demo window',NIL,1,NIL)
  8.   IF wptr  /* Check to see we opened a window */
  9.     Colour(1,3)
  10.     TextF(20,30,'Hello World')
  11.     SetTopaz(11)
  12.     TextF(20,60,'Hello World')
  13.     FOR i:=10 TO 150 STEP 8  /* Plot a few points */
  14.       Plot(i,40,2)
  15.     ENDFOR
  16.     Line(160,40,160,70,3)
  17.     Line(160,70,170,40,2)
  18.     Box(10,75,160,85,1)
  19.     WHILE WaitIMessage(wptr)<>IDCMP_CLOSEWINDOW
  20.     ENDWHILE
  21.     CloseW(wptr)
  22.   ELSE
  23.     WriteF('Error -- could not open window!\n')
  24.   ENDIF
  25. ENDPROC
  26.